package com.why.controller;


import com.why.entity.Region;
import com.why.entity.Result;
import com.why.service.IRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 吴慧跃
 * @since 2022-05-27
 */
@RestController
@RequestMapping("/region")
public class RegionController {

    @Autowired
    IRegionService regionService;

    @RequestMapping("/listRegion")
    public Result<List<Region>> listRegion(){
        List<Region> list = regionService.list();
        return new Result<List<Region>>(200,"",list);
    }

}
